home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / clisp-li.000 / clisp-li / clisp-1996-07-22 / doc / clreadline.man < prev    next >
Encoding:
Text File  |  1996-07-22  |  41.3 KB  |  925 lines

  1.  
  2.  
  3.  
  4. CLISP-READLINE(3)                               CLISP-READLINE(3)
  5.  
  6.  
  7. NNAAMMEE
  8.        readline - get a line from a user with editing
  9.  
  10. NNOOTTAATTIIOONN
  11.        An  emacs-style  notation  is  used  to denote keystrokes.
  12.        Control keys are denoted by C-_k_e_y, e.g.,  C-n  means  Con-
  13.        trol-N.  Similarly, _m_e_t_a keys are denoted by M-_k_e_y, so M-x
  14.        means Meta-X.  (On keyboards without a _m_e_t_a key, M-_x means
  15.        ESC  _x,  i.e.,  press the Escape key then the _x key.  This
  16.        makes ESC the _m_e_t_a _p_r_e_f_i_x.  The  combination  M-C-_x  means
  17.        ESC-Control-_x,  or press the Escape key then hold the Con-
  18.        trol key while pressing the _x key.)
  19.  
  20.        Readline commands may be given  numeric  _a_r_g_u_m_e_n_t_s,  which
  21.        normally act as a repeat count.  Sometimes, however, it is
  22.        the sign of the argument that is significant.   Passing  a
  23.        negative  argument  to  a command that acts in the forward
  24.        direction (e.g., kkiillll--lliinnee) causes that command to act  in
  25.        a  backward direction.  Commands whose behavior with argu-
  26.        ments deviates from this are noted.
  27.  
  28.        When a command is described  as  _k_i_l_l_i_n_g  text,  the  text
  29.        deleted  is saved for possible future retrieval (_y_a_n_k_i_n_g).
  30.        The killed text is  saved  in  a  _k_i_l_l_-_r_i_n_g.   Consecutive
  31.        kills  cause  the  text  to  be accumulated into one unit,
  32.        which can be yanked all at once.  Commands  which  do  not
  33.        kill text separate the chunks of text on the kill-ring.
  34.  
  35. IINNIITTIIAALLIIZZAATTIIOONN FFIILLEE
  36.        Readline  is customized by putting commands in an initial-
  37.        ization file.  The name of this file  is  taken  from  the
  38.        value of the IINNPPUUTTRRCC variable.  If that variable is unset,
  39.        the default is _~_/_._i_n_p_u_t_r_c.  When a program which uses  the
  40.        readline library starts up, the init file is read, and the
  41.        key bindings and variables are set.  There are only a  few
  42.        basic constructs allowed in the readline init file.  Blank
  43.        lines are ignored.  Lines beginning with a ## are comments.
  44.        Lines  beginning with a $$ indicate conditional constructs.
  45.        Other lines denote key  bindings  and  variable  settings.
  46.        Each  program  using this library may add its own commands
  47.        and bindings.
  48.  
  49.        For example, placing
  50.  
  51.               M-Control-u: universal-argument
  52.        or
  53.               C-Meta-u: universal-argument
  54.        into the _~_/_._i_n_p_u_t_r_c would make M-C-u execute the  readline
  55.        command _u_n_i_v_e_r_s_a_l_-_a_r_g_u_m_e_n_t.
  56.  
  57.        The  following  symbolic  character  names  are recognized
  58.        while processing key bindings: _R_U_B_O_U_T, _D_E_L, _E_S_C, _L_F_D, _N_E_W_-
  59.        _L_I_N_E,  _R_E_T,  _R_E_T_U_R_N,  _S_P_C, _S_P_A_C_E, and _T_A_B.  In addition to
  60.        command names, readline allows  keys  to  be  bound  to  a
  61.  
  62.  
  63.  
  64. GNU                       1994 August 18                        1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CLISP-READLINE(3)                               CLISP-READLINE(3)
  71.  
  72.  
  73.        string that is inserted when the key is pressed (a _m_a_c_r_o).
  74.  
  75.  
  76.    KKeeyy BBiinnddiinnggss
  77.        The syntax for controlling key bindings in the  _~_/_._i_n_p_u_t_r_c
  78.        file  is  simple.  All that is required is the name of the
  79.        command or the text of a macro and a key sequence to which
  80.        it  should  be  bound. The name may be specified in one of
  81.        two ways: as a symbolic key name, possibly with  _M_e_t_a_-  or
  82.        _C_o_n_t_r_o_l_-  prefixes,  or as a key sequence.  When using the
  83.        form kkeeyynnaammee:_f_u_n_c_t_i_o_n_-_n_a_m_e or _m_a_c_r_o, _k_e_y_n_a_m_e is  the  name
  84.        of a key spelled out in English.  For example:
  85.  
  86.               Control-u: universal-argument
  87.               Meta-Rubout: backward-kill-word
  88.               Control-o: ">&output"
  89.  
  90.        In the above example, _C_-_u is bound to the function uunniivveerr--
  91.        ssaall--aarrgguummeenntt,  _M_-_D_E_L  is  bound  to  the  function   bbaacckk--
  92.        wwaarrdd--kkiillll--wwoorrdd,   and  _C_-_o  is  bound  to  run  the  macro
  93.        expressed on the right hand side (that is, to  insert  the
  94.        text _>_&_o_u_t_p_u_t into the line).
  95.  
  96.        In  the second form, ""kkeeyysseeqq"":_f_u_n_c_t_i_o_n_-_n_a_m_e or _m_a_c_r_o, kkeeyy--
  97.        sseeqq differs from kkeeyynnaammee above in that strings denoting an
  98.        entire  key  sequence  may  be  specified  by  placing the
  99.        sequence within double quotes.  Some GNU Emacs  style  key
  100.        escapes can be used, as in the following example.
  101.  
  102.               "\C-u": universal-argument
  103.               "\C-x\C-r": re-read-init-file
  104.               "\e[11~": "Function Key 1"
  105.  
  106.        In  this  example, _C_-_u is again bound to the function uunnii--
  107.        vveerrssaall--aarrgguummeenntt.   _C_-_x  _C_-_r  is  bound  to  the   function
  108.        rree--rreeaadd--iinniitt--ffiillee,  and _E_S_C _[ _1 _1 _~ is bound to insert the
  109.        text FFuunnccttiioonn KKeeyy 11.  The full set of escape sequences is
  110.  
  111.               \\CC--    control prefix
  112.  
  113.               \\MM--    meta prefix
  114.  
  115.               \\ee     an escape character
  116.  
  117.               \\\\     backslash
  118.  
  119.               \\""     literal "
  120.  
  121.               \\''     literal '
  122.  
  123.        When entering the text of a macro, single or double quotes
  124.        should  be  used to indicate a macro definition.  Unquoted
  125.        text is assumed to be a  function  name.   Backslash  will
  126.        quote  any character in the macro text, including " and '.
  127.  
  128.  
  129.  
  130. GNU                       1994 August 18                        2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CLISP-READLINE(3)                               CLISP-READLINE(3)
  137.  
  138.  
  139.        BBaasshh allows the current readline key bindings to  be  dis-
  140.        played  or  modified  with  the bbiinndd builtin command.  The
  141.        editing mode may be switched  during  interactive  use  by
  142.        using  the  --oo  option  to the sseett builtin command.  Other
  143.        programs using this library  provide  similar  mechanisms.
  144.        The  _i_n_p_u_t_r_c  file  may be edited and re-read if a program
  145.        does not provide any other means to incorporate new  bind-
  146.        ings.
  147.  
  148.    VVaarriiaabblleess
  149.        Readline  has  variables  that can be used to further cus-
  150.        tomize its behavior.  A variable may be set in the _i_n_p_u_t_r_c
  151.        file with a statement of the form
  152.  
  153.               sseett _v_a_r_i_a_b_l_e_-_n_a_m_e _v_a_l_u_e
  154.  
  155.        Except where noted, readline variables can take the values
  156.        OOnn or OOffff.  The variables and their default values are:
  157.  
  158.        hhoorriizzoonnttaall--ssccrroollll--mmooddee ((OOffff))
  159.               When set to OOnn, makes readline use  a  single  line
  160.               for  display, scrolling the input horizontally on a
  161.               single screen line when it becomes longer than  the
  162.               screen width rather than wrapping to a new line.
  163.        eeddiittiinngg--mmooddee ((eemmaaccss))
  164.               Controls  whether readline begins with a set of key
  165.               bindings similar to _e_m_a_c_s or _v_i.  eeddiittiinngg--mmooddee  can
  166.               be set to either eemmaaccss or vvii.
  167.        mmaarrkk--mmooddiiffiieedd--lliinneess ((OOffff))
  168.               If set to OOnn, history lines that have been modified
  169.               are displayed with a preceding asterisk (**).
  170.        bbeellll--ssttyyllee ((aauuddiibbllee))
  171.               Controls what happens when readline wants  to  ring
  172.               the  terminal bell.  If set to nnoonnee, readline never
  173.               rings the bell.  If set to vviissiibbllee, readline uses a
  174.               visible  bell if one is available.  If set to aauuddii--
  175.               bbllee, readline attempts to ring the terminal's bell.
  176.        ccoommmmeenntt--bbeeggiinn ((````##''''))
  177.               The  string  that  is  inserted in vvii mode when the
  178.               vvii--ccoommmmeenntt command is executed.
  179.        mmeettaa--ffllaagg ((OOffff))
  180.               If set to OOnn, readline will enable eight-bit  input
  181.               (that  is,  it will not strip the high bit from the
  182.               characters it reads), regardless of what the termi-
  183.               nal claims it can support.
  184.        bblliinnkk--mmaattcchhiinngg--ppaarreenn ((OOnn))
  185.               If set to OOnn, readline will display the correspond-
  186.               ing opening parenthesis when a closing  parenthesis
  187.               is typed.
  188.        ccoonnvveerrtt--mmeettaa ((OOnn))
  189.               If set to OOnn, readline will convert characters with
  190.               the eighth bit set to  an  ASCII  key  sequence  by
  191.               stripping  the  eighth bit and prepending an escape
  192.               character (in effect,  using  escape  as  the  _m_e_t_a
  193.  
  194.  
  195.  
  196. GNU                       1994 August 18                        3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. CLISP-READLINE(3)                               CLISP-READLINE(3)
  203.  
  204.  
  205.               _p_r_e_f_i_x).
  206.        oouuttppuutt--mmeettaa ((OOffff))
  207.               If set to OOnn, readline will display characters with
  208.               the eighth bit set directly rather than as a  meta-
  209.               prefixed escape sequence.
  210.        ccoommpplleettiioonn--qquueerryy--iitteemmss ((110000))
  211.               This  determines  when  the  user  is queried about
  212.               viewing the number of possible  completions  gener-
  213.               ated  by  the ppoossssiibbllee--ccoommpplleettiioonnss command.  It may
  214.               be set to any integer value greater than  or  equal
  215.               to  zero.  If the number of possible completions is
  216.               greater than or equal to the value  of  this  vari-
  217.               able, the user is asked whether or not he wishes to
  218.               view them; otherwise they are simply listed on  the
  219.               terminal.
  220.        kkeeyymmaapp ((eemmaaccss))
  221.               Set  the current readline keymap.  The set of legal
  222.               keymap names is _e_m_a_c_s_, _e_m_a_c_s_-_s_t_a_n_d_a_r_d_,  _e_m_a_c_s_-_m_e_t_a_,
  223.               _e_m_a_c_s_-_c_t_l_x_, _v_i_, _v_i_-_m_o_v_e_, _v_i_-_c_o_m_m_a_n_d, and _v_i_-_i_n_s_e_r_t.
  224.               _v_i is equivalent to _v_i_-_c_o_m_m_a_n_d; _e_m_a_c_s is equivalent
  225.               to _e_m_a_c_s_-_s_t_a_n_d_a_r_d.  The default value is _e_m_a_c_s; the
  226.               value of  eeddiittiinngg--mmooddee  also  affects  the  default
  227.               keymap.
  228.        sshhooww--aallll--iiff--aammbbiigguuoouuss ((OOffff))
  229.               This  alters the default behavior of the completion
  230.               functions.  If set to oonn,  words  which  have  more
  231.               than  one  possible completion cause the matches to
  232.               be listed immediately instead of ringing the  bell.
  233.        eexxppaanndd--ttiillddee ((OOffff))
  234.               If  set  to  oonn,  tilde expansion is performed when
  235.               readline attempts word completion.
  236.  
  237.    CCoonnddiittiioonnaall CCoonnssttrruuccttss
  238.        Readline implements a facility similar in  spirit  to  the
  239.        conditional  compilation  features  of  the C preprocessor
  240.        which allows key bindings and variable settings to be per-
  241.        formed  as  the  result  of tests.  There are three parser
  242.        directives used.
  243.  
  244.        $$iiff    The $$iiff construct allows bindings to be made  based
  245.               on  the  editing  mode, the terminal being used, or
  246.               the application using readline.  The  text  of  the
  247.               test  extends to the end of the line; no characters
  248.               are required to isolate it.
  249.  
  250.               mmooddee   The mmooddee== form of the $$iiff directive is  used
  251.                      to  test  whether readline is in emacs or vi
  252.                      mode.  This may be used in conjunction  with
  253.                      the sseett kkeeyymmaapp command, for instance, to set
  254.                      bindings in the  _e_m_a_c_s_-_s_t_a_n_d_a_r_d  and  _e_m_a_c_s_-
  255.                      _c_t_l_x  keymaps  only  if readline is starting
  256.                      out in emacs mode.
  257.  
  258.               tteerrmm   The  tteerrmm==  form  may  be  used  to  include
  259.  
  260.  
  261.  
  262. GNU                       1994 August 18                        4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. CLISP-READLINE(3)                               CLISP-READLINE(3)
  269.  
  270.  
  271.                      terminal-specific  key  bindings, perhaps to
  272.                      bind the key sequences output by the  termi-
  273.                      nal's  function keys.  The word on the right
  274.                      side of the == is  tested  against  the  full
  275.                      name  of the terminal and the portion of the
  276.                      terminal name  before  the  first  --.   This
  277.                      allows  _s_u_n  to  match both _s_u_n and _s_u_n_-_c_m_d,
  278.                      for instance.
  279.  
  280.               aapppplliiccaattiioonn
  281.                      The aapppplliiccaattiioonn construct is used to include
  282.                      application-specific settings.  Each program
  283.                      using the readline library sets the _a_p_p_l_i_c_a_-
  284.                      _t_i_o_n  _n_a_m_e,  and  an initialization file can
  285.                      test for a particular value.  This could  be
  286.                      used to bind key sequences to functions use-
  287.                      ful for a specific program.   For  instance,
  288.                      the  following  command  adds a key sequence
  289.                      that quotes the current or previous word  in
  290.                      Bash:
  291.                      $$iiff bash
  292.                      # Quote the current or previous word
  293.                      "\C-xq": "\eb\"\ef\""
  294.                      $$eennddiiff
  295.  
  296.        $$eennddiiff This  command,  as you saw in the previous example,
  297.               terminates an $$iiff command.
  298.  
  299.        $$eellssee  Commands in this branch of the  $$iiff  directive  are
  300.               executed if the test fails.
  301.  
  302. EEDDIITTIINNGG CCOOMMMMAANNDDSS
  303.        The  following  is a list of the names of the commands and
  304.        the default key sequences to which they are bound.
  305.  
  306.    CCoommmmaannddss ffoorr MMoovviinngg
  307.        bbeeggiinnnniinngg--ooff--lliinnee ((CC--aa))
  308.               Move to the start of the current line.
  309.        eenndd--ooff--lliinnee ((CC--ee))
  310.               Move to the end of the line.
  311.        ffoorrwwaarrdd--cchhaarr ((CC--ff))
  312.               Move forward a character.
  313.        bbaacckkwwaarrdd--cchhaarr ((CC--bb))
  314.               Move back a character.
  315.        ffoorrwwaarrdd--wwoorrdd ((MM--ff))
  316.               Move forward to the end of the  next  word.   Words
  317.               are  composed  of  alphanumeric characters (letters
  318.               and digits).
  319.        bbaacckkwwaarrdd--wwoorrdd ((MM--bb))
  320.               Move back to the start of this,  or  the  previous,
  321.               word.   Words  are composed of alphanumeric charac-
  322.               ters (letters and digits).
  323.        cclleeaarr--ssccrreeeenn ((CC--ll))
  324.               Clear the screen leaving the current  line  at  the
  325.  
  326.  
  327.  
  328. GNU                       1994 August 18                        5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. CLISP-READLINE(3)                               CLISP-READLINE(3)
  335.  
  336.  
  337.               top  of  the screen.  With an argument, refresh the
  338.               current line without clearing the screen.
  339.        rreeddrraaww--ccuurrrreenntt--lliinnee
  340.               Refresh the current  line.   By  default,  this  is
  341.               unbound.
  342.  
  343.    CCoommmmaannddss ffoorr MMaanniippuullaattiinngg tthhee HHiissttoorryy
  344.        aacccceepptt--lliinnee ((NNeewwlliinnee,, RReettuurrnn))
  345.               Accept  the line regardless of where the cursor is.
  346.               If this line is non-empty, add it  to  the  history
  347.               list.  If the line is a modified history line, then
  348.               restore the history line to its original state.
  349.        pprreevviioouuss--hhiissttoorryy ((CC--pp))
  350.               Fetch the previous command from the  history  list,
  351.               moving back in the list.
  352.        nneexxtt--hhiissttoorryy ((CC--nn))
  353.               Fetch  the next command from the history list, mov-
  354.               ing forward in the list.
  355.        bbeeggiinnnniinngg--ooff--hhiissttoorryy ((MM--<<))
  356.               Move to the first line in the history.
  357.        eenndd--ooff--hhiissttoorryy ((MM-->>))
  358.               Move to the end of the  input  history,  i.e.,  the
  359.               line currently being entered.
  360.        rreevveerrssee--sseeaarrcchh--hhiissttoorryy ((CC--rr))
  361.               Search  backward  starting  at the current line and
  362.               moving `up' through the history as necessary.  This
  363.               is an incremental search.
  364.        ffoorrwwaarrdd--sseeaarrcchh--hhiissttoorryy ((CC--ss))
  365.               Search  forward  starting  at  the current line and
  366.               moving `down' through  the  history  as  necessary.
  367.               This is an incremental search.
  368.        nnoonn--iinnccrreemmeennttaall--rreevveerrssee--sseeaarrcchh--hhiissttoorryy ((MM--pp))
  369.               Search backward through the history starting at the
  370.               current line using a non-incremental search  for  a
  371.               string supplied by the user.
  372.        nnoonn--iinnccrreemmeennttaall--ffoorrwwaarrdd--sseeaarrcchh--hhiissttoorryy ((MM--nn))
  373.               Search   forward   through   the  history  using  a
  374.               non-incremental search for a string supplied by the
  375.               user.
  376.        hhiissttoorryy--sseeaarrcchh--ffoorrwwaarrdd
  377.               Search  forward  through the history for the string
  378.               of characters between the start of the current line
  379.               and  the  current point.  This is a non-incremental
  380.               search.  By default, this command is unbound.
  381.        hhiissttoorryy--sseeaarrcchh--bbaacckkwwaarrdd
  382.               Search backward through the history for the  string
  383.               of characters between the start of the current line
  384.               and the current point.  This is  a  non-incremental
  385.               search.  By default, this command is unbound.
  386.        yyaannkk--nntthh--aarrgg ((MM--CC--yy))
  387.               Insert  the  first argument to the previous command
  388.               (usually the second word on the previous  line)  at
  389.               point (the current cursor position).  With an argu-
  390.               ment _n, insert  the  _nth  word  from  the  previous
  391.  
  392.  
  393.  
  394. GNU                       1994 August 18                        6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. CLISP-READLINE(3)                               CLISP-READLINE(3)
  401.  
  402.  
  403.               command  (the  words  in the previous command begin
  404.               with word 0).  A negative argument inserts the  _nth
  405.               word from the end of the previous command.
  406.  
  407.    CCoommmmaannddss ffoorr CChhaannggiinngg TTeexxtt
  408.        ddeelleettee--cchhaarr ((CC--dd))
  409.               Delete the character under the cursor.  If point is
  410.               at the beginning of the line, there are no  charac-
  411.               ters  in the line, and the last character typed was
  412.               not CC--dd, then return EEOOFF.
  413.        bbaacckkwwaarrdd--ddeelleettee--cchhaarr ((RRuubboouutt))
  414.               Delete the character behind the cursor.  When given
  415.               a  numeric  argument,  save the deleted text on the
  416.               kill-ring.
  417.        qquuootteedd--iinnsseerrtt ((CC--qq,, CC--vv))
  418.               Add the next character that you type  to  the  line
  419.               verbatim.   This  is  how to insert characters like
  420.               CC--qq, for example.
  421.        ttaabb--iinnsseerrtt ((MM--TTAABB))
  422.               Insert a tab character.
  423.        sseellff--iinnsseerrtt ((aa,, bb,, AA,, 11,, !!,, ......))
  424.               Insert the character typed.
  425.        ttrraannssppoossee--cchhaarrss ((CC--tt))
  426.               Drag the character before point  forward  over  the
  427.               character  at  point.  Point moves forward as well.
  428.               If point is at the end of the line, then  transpose
  429.               the  two  characters  before point.  Negative argu-
  430.               ments don't work.
  431.        ttrraannssppoossee--wwoorrddss ((MM--tt))
  432.               Drag the word behind the cursor past  the  word  in
  433.               front  of  the  cursor  moving the cursor over that
  434.               word as well.
  435.        uuppccaassee--wwoorrdd ((MM--uu))
  436.               Uppercase the current (or following) word.  With  a
  437.               negative argument, do the previous word, but do not
  438.               move point.
  439.        ddoowwnnccaassee--wwoorrdd ((MM--ll))
  440.               Lowercase the current (or following) word.  With  a
  441.               negative argument, do the previous word, but do not
  442.               move point.
  443.        ccaappiittaalliizzee--wwoorrdd ((MM--cc))
  444.               Capitalize the current (or following) word.  With a
  445.               negative argument, do the previous word, but do not
  446.               move point.
  447.  
  448.    KKiilllliinngg aanndd YYaannkkiinngg
  449.        kkiillll--lliinnee ((CC--kk))
  450.               Kill the text from the current cursor  position  to
  451.               the end of the line.
  452.        bbaacckkwwaarrdd--kkiillll--lliinnee ((CC--xx RRuubboouutt))
  453.               Kill backward to the beginning of the line.
  454.        uunniixx--lliinnee--ddiissccaarrdd ((CC--uu))
  455.               Kill  backward  from  point to the beginning of the
  456.               line.
  457.  
  458.  
  459.  
  460. GNU                       1994 August 18                        7
  461.  
  462.  
  463.  
  464.  
  465.  
  466. CLISP-READLINE(3)                               CLISP-READLINE(3)
  467.  
  468.  
  469.        kkiillll--wwhhoollee--lliinnee
  470.               Kill all characters on the current line, no  matter
  471.               where  the cursor is.  By default, this is unbound.
  472.        kkiillll--wwoorrdd ((MM--dd))
  473.               Kill from the cursor to  the  end  of  the  current
  474.               word,  or  if between words, to the end of the next
  475.               word.  Word boundaries are the same as  those  used
  476.               by ffoorrwwaarrdd--wwoorrdd.
  477.        bbaacckkwwaarrdd--kkiillll--wwoorrdd ((MM--RRuubboouutt))
  478.               Kill  the  word behind the cursor.  Word boundaries
  479.               are the same as those used by bbaacckkwwaarrdd--wwoorrdd.
  480.        uunniixx--wwoorrdd--rruubboouutt ((CC--ww))
  481.               Kill the word behind the cursor, using white  space
  482.               as  a  word boundary.  The word boundaries are dif-
  483.               ferent from bbaacckkwwaarrdd--kkiillll--wwoorrdd.
  484.        ddeelleettee--hhoorriizzoonnttaall--ssppaaccee
  485.               Delete  all  spaces  and  tabs  around  point.   By
  486.               default, this is unbound.
  487.        yyaannkk ((CC--yy))
  488.               Yank  the  top  of the kill ring into the buffer at
  489.               the cursor.
  490.        yyaannkk--ppoopp ((MM--yy))
  491.               Rotate the kill-ring, and yank the new  top.   Only
  492.               works following yyaannkk or yyaannkk--ppoopp.
  493.  
  494.    NNuummeerriicc AArrgguummeennttss
  495.        ddiiggiitt--aarrgguummeenntt ((MM--00,, MM--11,, ......,, MM----))
  496.               Add  this  digit to the argument already accumulat-
  497.               ing, or start a new argument.  M-- starts  a  nega-
  498.               tive argument.
  499.        uunniivveerrssaall--aarrgguummeenntt
  500.               Each  time  this is executed, the argument count is
  501.               multiplied by four.  The  argument  count  is  ini-
  502.               tially  one,  so  executing this function the first
  503.               time makes the argument count  four.   By  default,
  504.               this is not bound to a key.
  505.  
  506.    CCoommpplleettiinngg
  507.        ccoommpplleettee ((TTAABB))
  508.               Attempt  to  perform  completion on the text before
  509.               point.  The actual completion performed is applica-
  510.               tion-specific.   CClliisspp, for instance, attempts com-
  511.               pletion of symbol names, of function names (if  the
  512.               text  is  prefixed  by (( or ##'') or of filenames (if
  513.               the text is prefixed by ##"").  BBaasshh,  on  the  other
  514.               hand,  attempts  completion  treating the text as a
  515.               variable (if the text begins with $$), username  (if
  516.               the  text  begins  with  ~~),  hostname (if the text
  517.               begins with @@), or command (including  aliases  and
  518.               functions)  in  turn.   If none of these produces a
  519.               match,  filename  completion  is  attempted.   GGddbb,
  520.               finally, allows completion of program functions and
  521.               variables, and only  attempts  filename  completion
  522.               under certain circumstances.
  523.  
  524.  
  525.  
  526. GNU                       1994 August 18                        8
  527.  
  528.  
  529.  
  530.  
  531.  
  532. CLISP-READLINE(3)                               CLISP-READLINE(3)
  533.  
  534.  
  535.        ppoossssiibbllee--ccoommpplleettiioonnss ((MM--??))
  536.               List  the  possible  completions of the text before
  537.               point.
  538.        iinnsseerrtt--ccoommpplleettiioonnss
  539.               Insert all completions of  the  text  before  point
  540.               that   would   have   been   generated   by  ppoossssii--
  541.               bbllee--ccoommpplleettiioonnss.  By default, this is not bound  to
  542.               a key.
  543.  
  544.    KKeeyybbooaarrdd MMaaccrrooss
  545.        ssttaarrtt--kkbbdd--mmaaccrroo ((CC--xx (())
  546.               Begin  saving the characters typed into the current
  547.               keyboard macro.
  548.        eenndd--kkbbdd--mmaaccrroo ((CC--xx ))))
  549.               Stop saving the characters typed into  the  current
  550.               keyboard macro and save the definition.
  551.        ccaallll--llaasstt--kkbbdd--mmaaccrroo ((CC--xx ee))
  552.               Re-execute the last keyboard macro defined, by mak-
  553.               ing the characters in the macro appear as if  typed
  554.               at the keyboard.
  555.  
  556.    MMiisscceellllaanneeoouuss
  557.        rree--rreeaadd--iinniitt--ffiillee ((CC--xx CC--rr))
  558.               Read  in the contents of your init file, and incor-
  559.               porate any bindings or variable  assignments  found
  560.               there.
  561.        aabboorrtt ((CC--gg))
  562.               Abort the current editing command and ring the ter-
  563.               minal's   bell   (subject   to   the   setting   of
  564.               bbeellll--ssttyyllee).
  565.        ddoo--uuppppeerrccaassee--vveerrssiioonn ((MM--aa,, MM--bb,, ......))
  566.               Run  the command that is bound to the corresponding
  567.               uppercase character.
  568.        pprreeffiixx--mmeettaa ((EESSCC))
  569.               Metafy the next character typed.  EESSCC ff is  equiva-
  570.               lent to MMeettaa--ff.
  571.        uunnddoo ((CC--__,, CC--xx CC--uu))
  572.               Incremental  undo,  separately  remembered for each
  573.               line.
  574.        rreevveerrtt--lliinnee ((MM--rr))
  575.               Undo all changes made to this line.  This  is  like
  576.               typing  the uunnddoo command enough times to return the
  577.               line to its initial state.
  578.        ttiillddee--eexxppaanndd ((MM--~~))
  579.               Perform tilde expansion on the current word.
  580.        dduummpp--ffuunnccttiioonnss
  581.               Print all of the functions and their  key  bindings
  582.               to  the readline output stream.  If a numeric argu-
  583.               ment is supplied, the output is formatted in such a
  584.               way that it can be made part of an _i_n_p_u_t_r_c file.
  585.        eemmaaccss--eeddiittiinngg--mmooddee ((CC--ee))
  586.               When  in  vvii  editing mode, this causes a switch to
  587.               eemmaaccss editing mode.
  588.  
  589.  
  590.  
  591.  
  592. GNU                       1994 August 18                        9
  593.  
  594.  
  595.  
  596.  
  597.  
  598. CLISP-READLINE(3)                               CLISP-READLINE(3)
  599.  
  600.  
  601.        vvii--eeddiittiinngg--mmooddee ((MM--CC--jj))
  602.               When in eemmaaccss editing mode, this causes a switch to
  603.               vvii editing mode.
  604.  
  605. DDEEFFAAUULLTT KKEEYY BBIINNDDIINNGGSS
  606.        The  following is a list of the default emacs and vi bind-
  607.        ings.  Characters with the 8th  bit  set  are  written  as
  608.        M-<character>, and are referred to as _m_e_t_a_f_i_e_d characters.
  609.        The printable ASCII characters not mentioned in  the  list
  610.        of  emacs  standard  bindings are bound to the _s_e_l_f_-_i_n_s_e_r_t
  611.        function, which just inserts the given character into  the
  612.        input  line.   In  vi  insertion  mode, all characters not
  613.        specifically mentioned are bound to _s_e_l_f_-_i_n_s_e_r_t.   Charac-
  614.        ters  assigned to signal generation by _s_t_t_y(1) or the ter-
  615.        minal driver, such as C-Z or C-C,  retain  that  function.
  616.        Upper  and lower case _m_e_t_a_f_i_e_d characters are bound to the
  617.        same function in the emacs mode meta keymap.  The  remain-
  618.        ing  characters are unbound, which causes readline to ring
  619.        the bell (subject to the setting of the  bbeellll--ssttyyllee  vari-
  620.        able).
  621.  
  622.    EEmmaaccss MMooddee
  623.              Emacs Standard bindings
  624.  
  625.              "C-A"                    ->  beginning-of-line
  626.              "C-B"                    ->  backward-char
  627.              "C-D"                    ->  delete-char
  628.              "C-E"                    ->  end-of-line
  629.              "C-F"                    ->  forward-char
  630.              "C-G"                    ->  abort
  631.              "C-H"                    ->  backward-delete-char
  632.              "C-I"                    ->  complete
  633.              "C-J"                    ->  accept-line
  634.              "C-K"                    ->  kill-line
  635.              "C-L"                    ->  clear-screen
  636.              "C-M"                    ->  accept-line
  637.              "C-N"                    ->  next-history
  638.              "C-P"                    ->  previous-history
  639.              "C-Q"                    ->  quoted-insert
  640.              "C-R"                    ->  reverse-search-history
  641.              "C-S"                    ->  forward-search-history
  642.              "C-T"                    ->  transpose-chars
  643.              "C-U"                    ->  unix-line-discard
  644.              "C-V"                    ->  quoted-insert
  645.              "C-W"                    ->  unix-word-rubout
  646.              "C-Y"                    ->  yank
  647.              "C-_"                    ->  undo
  648.              " " to "/"               ->  self-insert
  649.              "0"  to "9"              ->  self-insert
  650.              ":"  to "~"              ->  self-insert
  651.              "C-?"                    ->  backward-delete-char
  652.  
  653.              Emacs Meta bindings
  654.  
  655.  
  656.  
  657.  
  658. GNU                       1994 August 18                       10
  659.  
  660.  
  661.  
  662.  
  663.  
  664. CLISP-READLINE(3)                               CLISP-READLINE(3)
  665.  
  666.  
  667.              "M-C-H"                  ->  backward-kill-word
  668.              "M-C-I"                  ->  tab-insert
  669.              "M-C-J"                  ->  vi-editing-mode
  670.              "M-C-M"                  ->  vi-editing-mode
  671.              "M-C-R"                  ->  revert-line
  672.              "M-C-Y"                  ->  yank-nth-arg
  673.              "M-C-["                  ->  complete
  674.              "M-&"                    ->  tilde-expand
  675.              "M--"                    ->  digit-argument
  676.              "M-0"                    ->  digit-argument
  677.              "M-1"                    ->  digit-argument
  678.              "M-2"                    ->  digit-argument
  679.              "M-3"                    ->  digit-argument
  680.              "M-4"                    ->  digit-argument
  681.              "M-5"                    ->  digit-argument
  682.              "M-6"                    ->  digit-argument
  683.              "M-7"                    ->  digit-argument
  684.              "M-8"                    ->  digit-argument
  685.              "M-9"                    ->  digit-argument
  686.              "M-<"                    ->  beginning-of-history
  687.              "M->"                    ->  end-of-history
  688.              "M-?"                    ->  possible-completions
  689.              "M-B"                    ->  backward-word
  690.              "M-C"                    ->  capitalize-word
  691.              "M-D"                    ->  kill-word
  692.              "M-F"                    ->  forward-word
  693.              "M-L"                    ->  downcase-word
  694.              "M-N"                    ->  non-incremental-forward-search-history
  695.              "M-O"                    ->  arrow-key-prefix
  696.              "M-P"                    ->  non-incremental-reverse-search-history
  697.              "M-R"                    ->  revert-line
  698.              "M-T"                    ->  transpose-words
  699.              "M-U"                    ->  upcase-word
  700.              "M-Y"                    ->  yank-pop
  701.              "M-C-Y"                  ->  yank-nth-arg
  702.              "M-C-?"                  ->  backward-delete-word
  703.  
  704.              Emacs Control-X bindings
  705.  
  706.              "C-XC-G"                 ->  abort
  707.              "C-XC-R"                 ->  re-read-init-file
  708.              "C-XC-U"                 ->  undo
  709.              "C-X("                   ->  start-kbd-macro
  710.              "C-X)"                   ->  end-kbd-macro
  711.              "C-Xe"                   ->  call-last-kbd-macro
  712.              "C-XC-?"                 ->  backward-kill-line
  713.  
  714.  
  715.    VVII MMooddee bbiinnddiinnggss
  716.              VI Insert Mode functions
  717.  
  718.              "C-D"                    ->  vi-eof-maybe
  719.              "C-H"                    ->  backward-delete-char
  720.              "C-I"                    ->  complete
  721.  
  722.  
  723.  
  724. GNU                       1994 August 18                       11
  725.  
  726.  
  727.  
  728.  
  729.  
  730. CLISP-READLINE(3)                               CLISP-READLINE(3)
  731.  
  732.  
  733.              "C-J"                    ->  accept-line
  734.              "C-K"                    ->  kill-line
  735.              "C-L"                    ->  clear-screen
  736.              "C-M"                    ->  accept-line
  737.              "C-N"                    ->  next-history
  738.              "C-P"                    ->  previous-history
  739.              "C-Q"                    ->  quoted-insert
  740.              "C-R"                    ->  reverse-search-history
  741.              "C-S"                    ->  forward-search-history
  742.              "C-T"                    ->  transpose-chars
  743.              "C-U"                    ->  unix-line-discard
  744.              "C-V"                    ->  quoted-insert
  745.              "C-W"                    ->  unix-word-rubout
  746.              "C-Y"                    ->  yank
  747.              "C-["                    ->  vi-movement-mode
  748.              " " to "~"               ->  self-insert
  749.              "C-?"                    ->  backward-delete-char
  750.  
  751.              VI Command Mode functions
  752.  
  753.              "C-D"                    ->  vi-eof-maybe
  754.              "C-E"                    ->  emacs-editing-mode
  755.              "C-G"                    ->  abort
  756.              "C-H"                    ->  backward-char
  757.              "C-J"                    ->  accept-line
  758.              "C-K"                    ->  kill-line
  759.              "C-L"                    ->  clear-screen
  760.              "C-M"                    ->  accept-line
  761.              "C-N"                    ->  next-history
  762.              "C-P"                    ->  previous-history
  763.              "C-Q"                    ->  quoted-insert
  764.              "C-R"                    ->  reverse-search-history
  765.              "C-S"                    ->  forward-search-history
  766.              "C-T"                    ->  transpose-chars
  767.              "C-U"                    ->  unix-line-discard
  768.              "C-V"                    ->  quoted-insert
  769.              "C-W"                    ->  unix-word-rubout
  770.              "C-Y"                    ->  yank
  771.              "C-["                    ->  abort
  772.              " "                      ->  forward-char
  773.              "#"                      ->  vi-comment
  774.              "$"                      ->  end-of-line
  775.              "%"                      ->  vi-match
  776.              "&"                      ->  vi-tilde-expand
  777.              "*"                      ->  vi-complete
  778.              "+"                      ->  down-history
  779.              ","                      ->  vi-char-search
  780.              "-"                      ->  previous-history
  781.              "."                      ->  vi-redo
  782.              "/"                      ->  vi-search
  783.              "0"                      ->  beginning-of-line
  784.              "1" to "9"               ->  vi-arg-digit
  785.              ";"                      ->  vi-char-search
  786.              "="                      ->  vi-complete
  787.  
  788.  
  789.  
  790. GNU                       1994 August 18                       12
  791.  
  792.  
  793.  
  794.  
  795.  
  796. CLISP-READLINE(3)                               CLISP-READLINE(3)
  797.  
  798.  
  799.              "?"                      ->  vi-search
  800.              "@"                      ->  is undefined
  801.              "A"                      ->  vi-append-eol
  802.              "B"                      ->  vi-prev-word
  803.              "C"                      ->  vi-change-to
  804.              "D"                      ->  vi-delete-to
  805.              "E"                      ->  vi-end-word
  806.              "F"                      ->  vi-char-search
  807.              "I"                      ->  vi-insert-beg
  808.              "N"                      ->  vi-search-again
  809.              "P"                      ->  vi-put
  810.              "R"                      ->  vi-replace
  811.              "S"                      ->  vi-subst
  812.              "T"                      ->  vi-char-search
  813.              "U"                      ->  revert-line
  814.              "W"                      ->  vi-next-word
  815.              "X"                      ->  backward-delete-char
  816.              "Y"                      ->  vi-yank-to
  817.              "\"                      ->  vi-complete
  818.              "^"                      ->  vi-first-print
  819.              "_"                      ->  vi-yank-arg
  820.              "a"                      ->  vi-append-mode
  821.              "b"                      ->  vi-prev-word
  822.              "c"                      ->  vi-change-to
  823.              "d"                      ->  vi-delete-to
  824.              "e"                      ->  vi-end-word
  825.              "f"                      ->  vi-char-search
  826.              "h"                      ->  backward-char
  827.              "i"                      ->  vi-insertion-mode
  828.              "j"                      ->  next-history
  829.              "k"                      ->  prev-history
  830.              "l"                      ->  forward-char
  831.              "n"                      ->  vi-search-again
  832.              "r"                      ->  vi-change-char
  833.              "s"                      ->  vi-subst
  834.              "t"                      ->  vi-char-search
  835.              "u"                      ->  undo
  836.              "w"                      ->  vi-next-word
  837.              "x"                      ->  vi-delete
  838.              "y"                      ->  vi-yank-to
  839.              "|"                      ->  vi-column
  840.              "~"                      ->  vi-change-case
  841.  
  842. SSEEEE AALLSSOO
  843.        _T_h_e _G_n_u _R_e_a_d_l_i_n_e _L_i_b_r_a_r_y, Brian Fox
  844.        _T_h_e _G_n_u _H_i_s_t_o_r_y _L_i_b_r_a_r_y, Brian Fox
  845.        _b_a_s_h(1)
  846.  
  847. FFIILLEESS
  848.        _~_/_._i_n_p_u_t_r_c
  849.               Individual rreeaaddlliinnee initialization file
  850.  
  851. AAUUTTHHOORRSS
  852.               Brian   Fox,   Free  Software  Foundation  (primary
  853.  
  854.  
  855.  
  856. GNU                       1994 August 18                       13
  857.  
  858.  
  859.  
  860.  
  861.  
  862. CLISP-READLINE(3)                               CLISP-READLINE(3)
  863.  
  864.  
  865.               author)
  866.               bfox@ai.MIT.Edu
  867.  
  868.               Chet Ramey, Case Western Reserve University
  869.               chet@ins.CWRU.Edu
  870.  
  871.               Bruno Haible
  872.               haible@ma2s2.mathematik.uni-karlsruhe.de
  873.  
  874. BBUUGG RREEPPOORRTTSS
  875.        If you find a bug in rreeaaddlliinnee,, you should report it.  Send
  876.        mail to _h_a_i_b_l_e_@_m_a_2_s_2_._m_a_t_h_e_m_a_t_i_k_._u_n_i_-_k_a_r_l_s_r_u_h_e_._d_e.
  877.  
  878. BBUUGGSS
  879.        It's too big and too slow.
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922. GNU                       1994 August 18                       14
  923.  
  924.  
  925.